//获取字符串的长度
type LengthOfString<
  T extends string,
  A extends any[] = []
> = T extends `${infer L}${infer R}`
  ? LengthOfString<R, [...A, L]>
  : A["length"];
type A = LengthOfString<"sss.ggg">; //7
type A1 = LengthOfString<"">; //0

export {};
